namespace Cos.Core.NHibernate
{
    #region Usings

    using System;
    using System.Collections.Generic;

    #endregion

    public class ForumTopicDataModel
    {
        #region Constructors and Destructors

        public ForumTopicDataModel() {}

        #endregion

        #region Properties

        public virtual Guid Author { get; set; }

        public virtual DateTime CreationDate { get; set; }

        public virtual string CultureCode { get; set; }

        public virtual string Description { get; set; }

        //public virtual IEnumerable<ForumPostDataModel> ForumPosts { get; set; }

        //public virtual IEnumerable<ForumTopicTagDataModel> ForumTopicTags { get; set; }

        public virtual int Id { get; set; }

        public virtual bool IsDeleted { get; set; }

        public virtual bool IsLocked { get; set; }

        public virtual string Name { get; set; }

        //public virtual IEnumerable<ReadLogDataModel> ReadLogs { get; set; }

        public virtual bool IsSticky { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as ForumTopicDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id;
        }

        #endregion
    }
}